3.4.41 \(\int \frac {\sqrt {-c+d x} \sqrt {c+d x} (a+b x^2)}{x^3} \, dx\) [341]

Optimal. Leaf size=96 \[ b \sqrt {-c+d x} \sqrt {c+d x}-\frac {a \sqrt {-c+d x} \sqrt {c+d x}}{2 x^2}-\frac {\left (2 b c^2-a d^2\right ) \tan ^{-1}\left (\frac {\sqrt {-c+d x} \sqrt {c+d x}}{c}\right )}{2 c} \]

[Out]

-1/2*(-a*d^2+2*b*c^2)*arctan((d*x-c)^(1/2)*(d*x+c)^(1/2)/c)/c+b*(d*x-c)^(1/2)*(d*x+c)^(1/2)-1/2*a*(d*x-c)^(1/2
)*(d*x+c)^(1/2)/x^2

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 114, normalized size of antiderivative = 1.19, number of steps used = 5, number of rules used = 5, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {465, 103, 12, 94, 211} \begin {gather*} -\frac {\left (2 b c^2-a d^2\right ) \text {ArcTan}\left (\frac {\sqrt {d x-c} \sqrt {c+d x}}{c}\right )}{2 c}+\frac {1}{2} \sqrt {d x-c} \sqrt {c+d x} \left (2 b-\frac {a d^2}{c^2}\right )+\frac {a (d x-c)^{3/2} (c+d x)^{3/2}}{2 c^2 x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(Sqrt[-c + d*x]*Sqrt[c + d*x]*(a + b*x^2))/x^3,x]

[Out]

((2*b - (a*d^2)/c^2)*Sqrt[-c + d*x]*Sqrt[c + d*x])/2 + (a*(-c + d*x)^(3/2)*(c + d*x)^(3/2))/(2*c^2*x^2) - ((2*
b*c^2 - a*d^2)*ArcTan[(Sqrt[-c + d*x]*Sqrt[c + d*x])/c])/(2*c)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 94

Int[1/(Sqrt[(a_.) + (b_.)*(x_)]*Sqrt[(c_.) + (d_.)*(x_)]*((e_.) + (f_.)*(x_))), x_Symbol] :> Dist[b*f, Subst[I
nt[1/(d*(b*e - a*f)^2 + b*f^2*x^2), x], x, Sqrt[a + b*x]*Sqrt[c + d*x]], x] /; FreeQ[{a, b, c, d, e, f}, x] &&
 EqQ[2*b*d*e - f*(b*c + a*d), 0]

Rule 103

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(a + b
*x)^m*(c + d*x)^n*((e + f*x)^(p + 1)/(f*(m + n + p + 1))), x] - Dist[1/(f*(m + n + p + 1)), Int[(a + b*x)^(m -
 1)*(c + d*x)^(n - 1)*(e + f*x)^p*Simp[c*m*(b*e - a*f) + a*n*(d*e - c*f) + (d*m*(b*e - a*f) + b*n*(d*e - c*f))
*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && GtQ[m, 0] && GtQ[n, 0] && NeQ[m + n + p + 1, 0] && (Integ
ersQ[2*m, 2*n, 2*p] || (IntegersQ[m, n + p] || IntegersQ[p, m + n]))

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 465

Int[((e_.)*(x_))^(m_.)*((a1_) + (b1_.)*(x_)^(non2_.))^(p_.)*((a2_) + (b2_.)*(x_)^(non2_.))^(p_.)*((c_) + (d_.)
*(x_)^(n_)), x_Symbol] :> Simp[c*(e*x)^(m + 1)*(a1 + b1*x^(n/2))^(p + 1)*((a2 + b2*x^(n/2))^(p + 1)/(a1*a2*e*(
m + 1))), x] + Dist[(a1*a2*d*(m + 1) - b1*b2*c*(m + n*(p + 1) + 1))/(a1*a2*e^n*(m + 1)), Int[(e*x)^(m + n)*(a1
 + b1*x^(n/2))^p*(a2 + b2*x^(n/2))^p, x], x] /; FreeQ[{a1, b1, a2, b2, c, d, e, p}, x] && EqQ[non2, n/2] && Eq
Q[a2*b1 + a1*b2, 0] && (IntegerQ[n] || GtQ[e, 0]) && ((GtQ[n, 0] && LtQ[m, -1]) || (LtQ[n, 0] && GtQ[m + n, -1
])) &&  !ILtQ[p, -1]

Rubi steps

\begin {align*} \int \frac {\sqrt {-c+d x} \sqrt {c+d x} \left (a+b x^2\right )}{x^3} \, dx &=\frac {a (-c+d x)^{3/2} (c+d x)^{3/2}}{2 c^2 x^2}+\frac {1}{2} \left (2 b-\frac {a d^2}{c^2}\right ) \int \frac {\sqrt {-c+d x} \sqrt {c+d x}}{x} \, dx\\ &=\frac {1}{2} \left (2 b-\frac {a d^2}{c^2}\right ) \sqrt {-c+d x} \sqrt {c+d x}+\frac {a (-c+d x)^{3/2} (c+d x)^{3/2}}{2 c^2 x^2}+\frac {1}{2} \left (-2 b+\frac {a d^2}{c^2}\right ) \int \frac {c^2}{x \sqrt {-c+d x} \sqrt {c+d x}} \, dx\\ &=\frac {1}{2} \left (2 b-\frac {a d^2}{c^2}\right ) \sqrt {-c+d x} \sqrt {c+d x}+\frac {a (-c+d x)^{3/2} (c+d x)^{3/2}}{2 c^2 x^2}+\frac {1}{2} \left (-2 b c^2+a d^2\right ) \int \frac {1}{x \sqrt {-c+d x} \sqrt {c+d x}} \, dx\\ &=\frac {1}{2} \left (2 b-\frac {a d^2}{c^2}\right ) \sqrt {-c+d x} \sqrt {c+d x}+\frac {a (-c+d x)^{3/2} (c+d x)^{3/2}}{2 c^2 x^2}-\frac {1}{2} \left (d \left (2 b c^2-a d^2\right )\right ) \text {Subst}\left (\int \frac {1}{c^2 d+d x^2} \, dx,x,\sqrt {-c+d x} \sqrt {c+d x}\right )\\ &=\frac {1}{2} \left (2 b-\frac {a d^2}{c^2}\right ) \sqrt {-c+d x} \sqrt {c+d x}+\frac {a (-c+d x)^{3/2} (c+d x)^{3/2}}{2 c^2 x^2}-\frac {\left (2 b c^2-a d^2\right ) \tan ^{-1}\left (\frac {\sqrt {-c+d x} \sqrt {c+d x}}{c}\right )}{2 c}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.18, size = 74, normalized size = 0.77 \begin {gather*} \frac {\sqrt {-c+d x} \sqrt {c+d x} \left (-a+2 b x^2\right )}{2 x^2}+\left (-2 b c+\frac {a d^2}{c}\right ) \tan ^{-1}\left (\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(Sqrt[-c + d*x]*Sqrt[c + d*x]*(a + b*x^2))/x^3,x]

[Out]

(Sqrt[-c + d*x]*Sqrt[c + d*x]*(-a + 2*b*x^2))/(2*x^2) + (-2*b*c + (a*d^2)/c)*ArcTan[Sqrt[-c + d*x]/Sqrt[c + d*
x]]

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(181\) vs. \(2(80)=160\).
time = 0.32, size = 182, normalized size = 1.90

method result size
risch \(\frac {a \left (-d x +c \right ) \sqrt {d x +c}}{2 x^{2} \sqrt {d x -c}}-\frac {\left (-b \sqrt {\left (d x -c \right ) \left (d x +c \right )}+\frac {\ln \left (\frac {-2 c^{2}+2 \sqrt {-c^{2}}\, \sqrt {d^{2} x^{2}-c^{2}}}{x}\right ) a \,d^{2}}{2 \sqrt {-c^{2}}}-\frac {\ln \left (\frac {-2 c^{2}+2 \sqrt {-c^{2}}\, \sqrt {d^{2} x^{2}-c^{2}}}{x}\right ) b \,c^{2}}{\sqrt {-c^{2}}}\right ) \sqrt {\left (d x -c \right ) \left (d x +c \right )}}{\sqrt {d x -c}\, \sqrt {d x +c}}\) \(178\)
default \(-\frac {\sqrt {d x -c}\, \sqrt {d x +c}\, \left (\ln \left (-\frac {2 \left (c^{2}-\sqrt {-c^{2}}\, \sqrt {d^{2} x^{2}-c^{2}}\right )}{x}\right ) a \,d^{2} x^{2}-2 \ln \left (-\frac {2 \left (c^{2}-\sqrt {-c^{2}}\, \sqrt {d^{2} x^{2}-c^{2}}\right )}{x}\right ) b \,c^{2} x^{2}-2 b \,x^{2} \sqrt {-c^{2}}\, \sqrt {d^{2} x^{2}-c^{2}}+\sqrt {d^{2} x^{2}-c^{2}}\, \sqrt {-c^{2}}\, a \right )}{2 \sqrt {d^{2} x^{2}-c^{2}}\, x^{2} \sqrt {-c^{2}}}\) \(182\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^2+a)*(d*x-c)^(1/2)*(d*x+c)^(1/2)/x^3,x,method=_RETURNVERBOSE)

[Out]

-1/2*(d*x-c)^(1/2)*(d*x+c)^(1/2)*(ln(-2*(c^2-(-c^2)^(1/2)*(d^2*x^2-c^2)^(1/2))/x)*a*d^2*x^2-2*ln(-2*(c^2-(-c^2
)^(1/2)*(d^2*x^2-c^2)^(1/2))/x)*b*c^2*x^2-2*b*x^2*(-c^2)^(1/2)*(d^2*x^2-c^2)^(1/2)+(d^2*x^2-c^2)^(1/2)*(-c^2)^
(1/2)*a)/(d^2*x^2-c^2)^(1/2)/x^2/(-c^2)^(1/2)

________________________________________________________________________________________

Maxima [A]
time = 0.48, size = 98, normalized size = 1.02 \begin {gather*} b c \arcsin \left (\frac {c}{d {\left | x \right |}}\right ) - \frac {a d^{2} \arcsin \left (\frac {c}{d {\left | x \right |}}\right )}{2 \, c} + \sqrt {d^{2} x^{2} - c^{2}} b - \frac {\sqrt {d^{2} x^{2} - c^{2}} a d^{2}}{2 \, c^{2}} + \frac {{\left (d^{2} x^{2} - c^{2}\right )}^{\frac {3}{2}} a}{2 \, c^{2} x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)*(d*x-c)^(1/2)*(d*x+c)^(1/2)/x^3,x, algorithm="maxima")

[Out]

b*c*arcsin(c/(d*abs(x))) - 1/2*a*d^2*arcsin(c/(d*abs(x)))/c + sqrt(d^2*x^2 - c^2)*b - 1/2*sqrt(d^2*x^2 - c^2)*
a*d^2/c^2 + 1/2*(d^2*x^2 - c^2)^(3/2)*a/(c^2*x^2)

________________________________________________________________________________________

Fricas [A]
time = 2.39, size = 85, normalized size = 0.89 \begin {gather*} -\frac {2 \, {\left (2 \, b c^{2} - a d^{2}\right )} x^{2} \arctan \left (-\frac {d x - \sqrt {d x + c} \sqrt {d x - c}}{c}\right ) - {\left (2 \, b c x^{2} - a c\right )} \sqrt {d x + c} \sqrt {d x - c}}{2 \, c x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)*(d*x-c)^(1/2)*(d*x+c)^(1/2)/x^3,x, algorithm="fricas")

[Out]

-1/2*(2*(2*b*c^2 - a*d^2)*x^2*arctan(-(d*x - sqrt(d*x + c)*sqrt(d*x - c))/c) - (2*b*c*x^2 - a*c)*sqrt(d*x + c)
*sqrt(d*x - c))/(c*x^2)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b x^{2}\right ) \sqrt {- c + d x} \sqrt {c + d x}}{x^{3}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x**2+a)*(d*x-c)**(1/2)*(d*x+c)**(1/2)/x**3,x)

[Out]

Integral((a + b*x**2)*sqrt(-c + d*x)*sqrt(c + d*x)/x**3, x)

________________________________________________________________________________________

Giac [A]
time = 0.64, size = 157, normalized size = 1.64 \begin {gather*} \frac {\sqrt {d x + c} \sqrt {d x - c} b d + \frac {{\left (2 \, b c^{2} d - a d^{3}\right )} \arctan \left (\frac {{\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{2}}{2 \, c}\right )}{c} + \frac {2 \, {\left (a d^{3} {\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{6} - 4 \, a c^{2} d^{3} {\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{2}\right )}}{{\left ({\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{4} + 4 \, c^{2}\right )}^{2}}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)*(d*x-c)^(1/2)*(d*x+c)^(1/2)/x^3,x, algorithm="giac")

[Out]

(sqrt(d*x + c)*sqrt(d*x - c)*b*d + (2*b*c^2*d - a*d^3)*arctan(1/2*(sqrt(d*x + c) - sqrt(d*x - c))^2/c)/c + 2*(
a*d^3*(sqrt(d*x + c) - sqrt(d*x - c))^6 - 4*a*c^2*d^3*(sqrt(d*x + c) - sqrt(d*x - c))^2)/((sqrt(d*x + c) - sqr
t(d*x - c))^4 + 4*c^2)^2)/d

________________________________________________________________________________________

Mupad [B]
time = 6.89, size = 584, normalized size = 6.08 \begin {gather*} b\,\sqrt {-c}\,\sqrt {c}\,\ln \left (\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}+1\right )-\frac {\frac {a\,\sqrt {-c}\,d^2}{32\,c^{3/2}}+\frac {a\,\sqrt {-c}\,d^2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{16\,c^{3/2}\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}-\frac {15\,a\,\sqrt {-c}\,d^2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^4}{32\,c^{3/2}\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^4}}{\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}+\frac {2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^4}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^4}+\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^6}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^6}}-b\,\sqrt {-c}\,\sqrt {c}\,\ln \left (\frac {\sqrt {c+d\,x}-\sqrt {c}}{\sqrt {-c}-\sqrt {d\,x-c}}\right )+\frac {a\,\sqrt {-c}\,d^2\,\ln \left (\frac {\sqrt {c+d\,x}-\sqrt {c}}{\sqrt {-c}-\sqrt {d\,x-c}}\right )}{2\,c^{3/2}}-\frac {a\,\sqrt {-c}\,d^2\,\ln \left (\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}+1\right )}{2\,c^{3/2}}-\frac {a\,\sqrt {-c}\,d^2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{32\,c^{3/2}\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}-\frac {8\,b\,\sqrt {-c}\,\sqrt {c}\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2\,\left (\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^4}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^4}-\frac {2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}+1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + b*x^2)*(c + d*x)^(1/2)*(d*x - c)^(1/2))/x^3,x)

[Out]

b*(-c)^(1/2)*c^(1/2)*log(((c + d*x)^(1/2) - c^(1/2))^2/((-c)^(1/2) - (d*x - c)^(1/2))^2 + 1) - ((a*(-c)^(1/2)*
d^2)/(32*c^(3/2)) + (a*(-c)^(1/2)*d^2*((c + d*x)^(1/2) - c^(1/2))^2)/(16*c^(3/2)*((-c)^(1/2) - (d*x - c)^(1/2)
)^2) - (15*a*(-c)^(1/2)*d^2*((c + d*x)^(1/2) - c^(1/2))^4)/(32*c^(3/2)*((-c)^(1/2) - (d*x - c)^(1/2))^4))/(((c
 + d*x)^(1/2) - c^(1/2))^2/((-c)^(1/2) - (d*x - c)^(1/2))^2 + (2*((c + d*x)^(1/2) - c^(1/2))^4)/((-c)^(1/2) -
(d*x - c)^(1/2))^4 + ((c + d*x)^(1/2) - c^(1/2))^6/((-c)^(1/2) - (d*x - c)^(1/2))^6) - b*(-c)^(1/2)*c^(1/2)*lo
g(((c + d*x)^(1/2) - c^(1/2))/((-c)^(1/2) - (d*x - c)^(1/2))) + (a*(-c)^(1/2)*d^2*log(((c + d*x)^(1/2) - c^(1/
2))/((-c)^(1/2) - (d*x - c)^(1/2))))/(2*c^(3/2)) - (a*(-c)^(1/2)*d^2*log(((c + d*x)^(1/2) - c^(1/2))^2/((-c)^(
1/2) - (d*x - c)^(1/2))^2 + 1))/(2*c^(3/2)) - (a*(-c)^(1/2)*d^2*((c + d*x)^(1/2) - c^(1/2))^2)/(32*c^(3/2)*((-
c)^(1/2) - (d*x - c)^(1/2))^2) - (8*b*(-c)^(1/2)*c^(1/2)*((c + d*x)^(1/2) - c^(1/2))^2)/(((-c)^(1/2) - (d*x -
c)^(1/2))^2*(((c + d*x)^(1/2) - c^(1/2))^4/((-c)^(1/2) - (d*x - c)^(1/2))^4 - (2*((c + d*x)^(1/2) - c^(1/2))^2
)/((-c)^(1/2) - (d*x - c)^(1/2))^2 + 1))

________________________________________________________________________________________